package csc.fresher.dao;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import csc.fresher.domain.Role;

@Repository
public class RoleDAOImpl implements RoleDAO {

	@Autowired
	private SessionFactory sessionFactory;
	
	@Override
	public Role getRole(int roleid) {
		Role role  = (Role) sessionFactory.getCurrentSession().get(Role.class, roleid);
		return role;
	}

}
